const express = require('express')

const app= express();

app.get('/students', (req, res)=>{
    const studentList = [
        {
            name:'张三',
            age:12,
            sex:'man'
        },
        {
            name:'李四',
            age:16,
            sex:'man'
        },
        {
            name:'王红',
            age:19,
            sex:'woman'
        },
    ]
    res.json(studentList)
});
app.listen(4000, ()=>{
    console.log('Server is running at http://localhost:4000')
})